package com.sjyy.common.dict;

public enum PayStatusEnum {
	PAY_STATUS_SUCCESS("支付成功",1),
	PAY_STATUS_FAIL("支付失败", -1),
	PAY_STATUS_MISMATCH("支付不匹配", 2),
	PAY_STATUS_MISMATCH_CONFIRM("支付已确认", 3), 
	PAY_STATUS_BACKOUT("支付已撤销", 4),
	;

	private String name;
	private int key;

	private PayStatusEnum(String name, int key) {
		this.name = name;
		this.key = key;
	}

	public static String getNameByKey(int key) {
		for (PayStatusEnum a : PayStatusEnum.values()) {
			if (a.getKey() == key) {
				return a.name;
			}
		}
		return "未知";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

}
